﻿<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh_CN">
<head>
<%@ include file="../common/header.jsp"%>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
</head>
<body>

	<div class="container " style="margin-top: 20px">
		<%@ include file="../common/top.jsp"%>

		<div class="row">
			<div class="col-sm-3">
				<c:set var="menu" value="customerTransfer" />
				<%@ include file="../common/menu.jsp"%>
			</div>
			<div class="col-sm-9">
				<div class="row">
					<div class="col-sm-12">
						<h1 class="page-head-line">移交历史管理</h1>
					</div>
				</div>
				<form class="form-inline" id="searchForm" action="/customerTransfer/list.do"
					method="post">
					<input type="hidden" name="currentPage" id="currentPage" value="1">
					<div class="form-group">
						<label>关键字:</label> <input type="text" class="form-control"
							name="keyword" value="${qo.keyword}" placeholder="请输入客户姓名">
					</div>
					<div class="form-group">
	                    <label>时间:</label>
	                    <input type="text" class="form-control" name="beginDate"
	                           value='<fmt:formatDate value="${qo.beginDate}" pattern="yyyy-MM-dd"/>' placeholder="请输入开始时间"/>
	                    <input type="text" class="form-control" name="endDate"
	                           value="<fmt:formatDate value="${qo.endDate}" pattern="yyyy-MM-dd"/>" placeholder="请输入结束时间"/>
	                </div>

					<button type="submit" class="btn btn-primary">
						<span class="glyphicon glyphicon-search"></span> 查询
					</button>
				</form>

				<table class="table table-striped table-hover">
					<tr>
						<th>编号</th>
						<th>客户姓名</th>
						<th>移交时间</th>
						<th>移交人</th>
						<th>旧营销人员</th>
						<th>新营销人员</th>
						<th>移交原因</th>
					</tr>

					<c:forEach var="entity" items="${pageInfo.list}">
						<tr>
							<td>${entity.id}</td>
							<td>${entity.customerName}</td>
							<td><fmt:formatDate value="${entity.operateTime}" pattern="yyyy-MM-dd HH:mm"/></td>
							<td>${entity.operatorName}</td>
							<td>${entity.oldSellerName}</td>
							<td>${entity.newSellerName}</td>
							<td>${entity.reason}</td>
						</tr>
					</c:forEach>

				</table>

				<%@ include file="../common/page.jsp"%>
			</div>
		</div>
	</div>
		

<script>
	$(function() {
		
		////////////////////
		$("#searchForm input[name='beginDate']").click(function () {
            WdatePicker({
                readOnly: true, //只读
                maxDate: new Date() //最多选到今天
            });
        });
		
		$("#searchForm input[name='endDate']").click(function() {
			WdatePicker({
				readOnly: true,
				minDate: $("#searchForm input[name='beginDate']").val(),
				maxDate: new Date()
			});
		});
		
		
	})
</script>
</body>
</html>